package com.xiyoufang.club.utils;

import java.io.PrintStream;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class ClubUtils
{
  public static void main(String[] args)
  {
    System.out.println(getDataByNyrStr("2019-11-05"));
  }
  
  public static Date getDataByNyrStr(String nyr)
  {
    Date date = null;
    
    DateFormat format1 = new SimpleDateFormat("yyyy-MM-dd");
    try
    {
      date = format1.parse(nyr);
    }
    catch (ParseException e)
    {
      e.printStackTrace();
    }
    return date;
  }
  
  public static String getMemberInviteCode(int clubId, String userId)
  {
    StringBuilder sb = new StringBuilder(String.valueOf(clubId));
    
    String userIdS = String.valueOf(userId);
    sb.append(userIdS.substring(2));
    
    return sb.toString();
  }
}
